package com.blazemina.mina.config;

/**
 * socket配置选项
 * 
 * @author JackChu
 * @version 1.0.0 2012-2-6 下午10:03:09
 */
public class SocketOption {
	private int socketReceiveBuffer;
	private int socketSendBuffer;
	private boolean keepAlive;
	private boolean tcpNoDelay;
	private int bothIdleTimeSeconds;
	private int readIdleTimeSeconds;
	private int writeIdleTimeSeconds;
	private String codecFactory;
	private int port;
	private String host;
	private int ioThread = Runtime.getRuntime().availableProcessors();

	private boolean hasSocketReceiveBuffer;
	private boolean hasSocketSendBuffer;
	private boolean hasKeepAlive;
	private boolean hasTcpNoDelay;
	private boolean hasBothIdleTimeSeconds;
	private boolean hasReadIdleTimeSeconds;
	private boolean hasWriteIdleTimeSeconds;

	/**
	 * =============robot==========
	 */
	private int robotNums;

	/**
	 * 两个robot请求间隔 毫秒数
	 */
	private int interval;

	/**
	 * @return the hasSocketReceiveBuffer
	 */
	public boolean isHasSocketReceiveBuffer() {
		return hasSocketReceiveBuffer;
	}

	/**
	 * @param hasSocketReceiveBuffer
	 *            the hasSocketReceiveBuffer to set
	 */
	public void setHasSocketReceiveBuffer(boolean hasSocketReceiveBuffer) {
		this.hasSocketReceiveBuffer = hasSocketReceiveBuffer;
	}

	/**
	 * @return the hasSocketSendBuffer
	 */
	public boolean isHasSocketSendBuffer() {
		return hasSocketSendBuffer;
	}

	/**
	 * @param hasSocketSendBuffer
	 *            the hasSocketSendBuffer to set
	 */
	public void setHasSocketSendBuffer(boolean hasSocketSendBuffer) {
		this.hasSocketSendBuffer = hasSocketSendBuffer;
	}

	/**
	 * @return the hasKeepAlive
	 */
	public boolean isHasKeepAlive() {
		return hasKeepAlive;
	}

	/**
	 * @param hasKeepAlive
	 *            the hasKeepAlive to set
	 */
	public void setHasKeepAlive(boolean hasKeepAlive) {
		this.hasKeepAlive = hasKeepAlive;
	}

	/**
	 * @return the hasTcpNoDelay
	 */
	public boolean isHasTcpNoDelay() {
		return hasTcpNoDelay;
	}

	/**
	 * @param hasTcpNoDelay
	 *            the hasTcpNoDelay to set
	 */
	public void setHasTcpNoDelay(boolean hasTcpNoDelay) {
		this.hasTcpNoDelay = hasTcpNoDelay;
	}

	/**
	 * @return the keepAlive
	 */
	public boolean isKeepAlive() {
		return keepAlive;
	}

	/**
	 * @param keepAlive
	 *            the keepAlive to set
	 */
	public void setKeepAlive(boolean keepAlive) {
		this.keepAlive = keepAlive;
	}

	/**
	 * @return the socketReceiveBuffer
	 */
	public int getSocketReceiveBuffer() {
		return socketReceiveBuffer;
	}

	/**
	 * @param socketReceiveBuffer
	 *            the socketReceiveBuffer to set
	 */
	public void setSocketReceiveBuffer(int socketReceiveBuffer) {
		this.socketReceiveBuffer = socketReceiveBuffer;
	}

	/**
	 * @return the socketSendBuffer
	 */
	public int getSocketSendBuffer() {
		return socketSendBuffer;
	}

	/**
	 * @param socketSendBuffer
	 *            the socketSendBuffer to set
	 */
	public void setSocketSendBuffer(int socketSendBuffer) {
		this.socketSendBuffer = socketSendBuffer;
	}

	/**
	 * @return the tcpNoDelay
	 */
	public boolean isTcpNoDelay() {
		return tcpNoDelay;
	}

	/**
	 * @param tcpNoDelay
	 *            the tcpNoDelay to set
	 */
	public void setTcpNoDelay(boolean tcpNoDelay) {
		this.tcpNoDelay = tcpNoDelay;
	}

	/**
	 * @return the ioThread
	 */
	public int getIoThread() {
		return ioThread;
	}

	/**
	 * @param ioThread
	 *            the ioThread to set
	 */
	public void setIoThread(int ioThread) {
		this.ioThread = ioThread;
	}

	/**
	 * @return the bothIdleTimeSeconds
	 */
	public int getBothIdleTimeSeconds() {
		return bothIdleTimeSeconds;
	}

	/**
	 * @param bothIdleTimeSeconds
	 *            the bothIdleTimeSeconds to set
	 */
	public void setBothIdleTimeSeconds(int bothIdleTimeSeconds) {
		this.bothIdleTimeSeconds = bothIdleTimeSeconds;
	}

	/**
	 * @return the readIdleTimeSeconds
	 */
	public int getReadIdleTimeSeconds() {
		return readIdleTimeSeconds;
	}

	/**
	 * @param readIdleTimeSeconds
	 *            the readIdleTimeSeconds to set
	 */
	public void setReadIdleTimeSeconds(int readIdleTimeSeconds) {
		this.readIdleTimeSeconds = readIdleTimeSeconds;
	}

	/**
	 * @return the writeIdleTimeSeconds
	 */
	public int getWriteIdleTimeSeconds() {
		return writeIdleTimeSeconds;
	}

	/**
	 * @param writeIdleTimeSeconds
	 *            the writeIdleTimeSeconds to set
	 */
	public void setWriteIdleTimeSeconds(int writeIdleTimeSeconds) {
		this.writeIdleTimeSeconds = writeIdleTimeSeconds;
	}

	/**
	 * @return the hasBothIdleTimeSeconds
	 */
	public boolean isHasBothIdleTimeSeconds() {
		return hasBothIdleTimeSeconds;
	}

	/**
	 * @param hasBothIdleTimeSeconds
	 *            the hasBothIdleTimeSeconds to set
	 */
	public void setHasBothIdleTimeSeconds(boolean hasBothIdleTimeSeconds) {
		this.hasBothIdleTimeSeconds = hasBothIdleTimeSeconds;
	}

	/**
	 * @return the hasReadIdleTimeSeconds
	 */
	public boolean isHasReadIdleTimeSeconds() {
		return hasReadIdleTimeSeconds;
	}

	/**
	 * @param hasReadIdleTimeSeconds
	 *            the hasReadIdleTimeSeconds to set
	 */
	public void setHasReadIdleTimeSeconds(boolean hasReadIdleTimeSeconds) {
		this.hasReadIdleTimeSeconds = hasReadIdleTimeSeconds;
	}

	/**
	 * @return the hasWriteIdleTimeSeconds
	 */
	public boolean isHasWriteIdleTimeSeconds() {
		return hasWriteIdleTimeSeconds;
	}

	/**
	 * @param hasWriteIdleTimeSeconds
	 *            the hasWriteIdleTimeSeconds to set
	 */
	public void setHasWriteIdleTimeSeconds(boolean hasWriteIdleTimeSeconds) {
		this.hasWriteIdleTimeSeconds = hasWriteIdleTimeSeconds;
	}

	/**
	 * @return the codecFactory
	 */
	public String getCodecFactory() {
		return codecFactory;
	}

	/**
	 * @param codecFactory
	 *            the codecFactory to set
	 */
	public void setCodecFactory(String codecFactory) {
		this.codecFactory = codecFactory;
	}

	/**
	 * @return the port
	 */
	public int getPort() {
		return port;
	}

	/**
	 * @param port
	 *            the port to set
	 */
	public void setPort(int port) {
		this.port = port;
	}

	/**
	 * @return the host
	 */
	public String getHost() {
		return host;
	}

	/**
	 * @param host
	 *            the host to set
	 */
	public void setHost(String host) {
		this.host = host;
	}

	public int getRobotNums() {
		return robotNums;
	}

	public void setRobotNums(int robotNums) {
		this.robotNums = robotNums;
	}

	public int getInterval() {
		return interval;
	}

	public void setInterval(int interval) {
		this.interval = interval;
	}

}